import { Component, Input, Output, EventEmitter } from "@angular/core";
import { NavController } from "ionic-angular";

@Component({
  selector: "no-more",
  template: `
    <div class="no-more-wrap" *ngIf="dataList">
      <div class="nothing-tip" *ngIf="dataList &&  dataList.length == 0">
        <img src="./assets/imgs/empty.png" alt="">
        <p *ngIf="!type">空空如也~</p>
      </div>
      <div class="no-more" *ngIf="allLoad && dataList.length != 0">THE END</div>
    </div>
 `,
})
export class NoMoreComponent {
  @Input() dataList;
  @Input() allLoad;
  @Input() type;

  @Output() onSuccess = new EventEmitter<any>();

  constructor(
    public navCtrl: NavController,
  ) {
  }

  onEmit() {
    this.onSuccess.emit(true);
  }

}

// 引入 
// import { NoMoreComponent } from '../../components/no-more';
